package com.zhangbo.study.designpatternlearning.command;

public class SimpleRemoteControl {

    private Command onCommand;

    private Command offCommand;

    public SimpleRemoteControl(Command onCommand, Command offCommand) {
        this.onCommand = onCommand;
        this.offCommand = offCommand;
    }

    public void buttonWasLightOn() {
        this.onCommand.execute();
    }


    public void buttonWasLightOff() {
        this.offCommand.execute();
    }

}
